{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Before you turn this problem in, make sure everything runs as expected. First, **restart the kernel** (in the menubar, select Kernel$\\rightarrow$Restart) and then **run all cells** (in the menubar, select Cell$\\rightarrow$Run All).\n",
    "\n",
    "Make sure you fill in any place that says `YOUR CODE HERE` or \"YOUR ANSWER HERE\", as well as your name and collaborators below:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "NAME = \"Alyssa P. Hacker\"\n",
    "COLLABORATORS = \"Ben Bitdiddle\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "---"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Consider the following piece of code:\n",
    "\n",
    "```python\n",
    "def f(x):\n",
    "    if x == 0 or x == 1:\n",
    "        return x\n",
    "    return f(x - 1) + f(x - 2)\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "---\n",
    "## Part A (1 point)\n",
    "\n",
    "Describe, in words, what this code does, and how it does it."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": false,
    "nbgrader": {
     "cell_type": "markdown",
     "checksum": "6d5a9eb99c3e76354b6e360ce228580a",
     "grade": true,
     "grade_id": "part-a",
     "locked": false,
     "points": 1.0,
     "schema_version": 3,
     "solution": true
    }
   },
   "source": [
    "It computes the fibonacci sequence using recursion, with base cases of $x=0$ and $x=1$."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "---\n",
    "## Part B (2 points)\n",
    "\n",
    "For what inputs will this function not behave as expected? What will happen?"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": false,
    "nbgrader": {
     "cell_type": "markdown",
     "checksum": "789281f32aa7a8d789bd9f18de9efd00",
     "grade": true,
     "grade_id": "part-b",
     "locked": false,
     "points": 2.0,
     "schema_version": 3,
     "solution": true
    }
   },
   "source": [
    "It computes the fibonacci sequence using recursion, with base cases of $x=0$ and $x=1$."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python",
   "language": "python",
   "name": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
